import service from '@/utils/request.ts'
import { getCurrentClientTime } from '@/utils/index'

interface FetchRewardsDetails {
    device: string,
    lotteryType: number // 1: 抽奖, 2: 砸蛋
}
export const fetchRewardsDetails = (data: FetchRewardsDetails) => {
    return service.post('/tLotteryRecord/lottery', { ...data, lotteryTime: getCurrentClientTime() })
}

export const fetchGameTaskList = (data: { device: string }) => {
    return service.post('/tGameTask/findGameUserTskCompleteNum', data)
}

export const fetchGameDetail = (data: { device: string, gameId: string }) => {
    return service.post('/tGameStepUser/findGameStopUserDesc', data)
}